package com.niguang.labour.admin.entity;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 'work.v_personSite' is not BASE TABLE
 * </p>
 *
 * @author
 * @since 2018-06-10
 */
@TableName("work_team_user")
@Data
@NoArgsConstructor
public class WorkTeamUser extends Model<WorkTeamUser> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;
    /**
     * 用户 ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 班组名称
     */
    @TableField("bz_name")
    @NotNull(message = "班组名称不能为空！")
    private String bzName;

    /**
     * 工地ID
     */
    @TableField("site_id")
    @NotNull(message = "工地ID不能为空！")
    private Long siteId;
    /**
     * 工种 ID
     */
    @TableField("work_type_id")
    private Long workTypeId;

    @TableField("create_time")
    private Date createTime;

    @TableField("del_flag")
    private Integer delFlag;

    /**
     * 班组长ID
     */
    @TableField("team_user_id")
    @NotNull(message = "班组长不能为空！")
    private Long teamUserId;

    /**
     * 劳务公司ID
     */
    @TableField("labor_company_id")
    private Long laborCorompanyId;

    /**
     * 月薪资
     */
    @TableField("month_salary")
    @NotNull(message = "月薪资不能为空！")
    private Double monthSalary;

    /**
     * 起算时间（月薪）
     */
    @TableField("start_salary_date")
    @NotBlank(message = "月薪起始时间不能为空！")
    private String startSalaryDate;


    public WorkTeamUser(Long id, Integer delFlag) {
        this.id = id;
        this.delFlag = delFlag;
    }

    public static final String ID = "id";

    public static final String USER_ID = "user_id";

    public static final String SITE_ID = "site_id";

    public static final String WORK_TYPE_ID = "work_type_id";

    public static final String CREATE_TIME = "create_time";

    public static final String DEL_FLAG = "del_flag";

    public static final String TEAM_USER_ID = "team_user_id";

    public static final String LABOR_COMPANY_ID = "labor_company_id";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "WorkTeamUser{" +
                "id=" + id +
                ", userId=" + userId +
                ", siteId=" + siteId +
                ", workTypeId=" + workTypeId +
                ", createTime=" + createTime +
                ", delFlag=" + delFlag +
                "}";
    }
}
